package ee.videorentalstore.protocols.commands.customercommands;

import ee.videorentalstore.UserAndProtocolManager;
import ee.videorentalstore.bonustracker.CustomerAndItsBonusPoints;
import ee.videorentalstore.bonustracker.CustomerBonusPointsManager;
import ee.videorentalstore.protocols.commands.Command;
import ee.videorentalstore.users.UsersDatabase;
import ee.videorentalstore.users.types.Customer;

public class GetCustomerBonusPointsCommand extends Command
{
	@Override
	public String getCommandDescription() 
	{
		return "GET MY BONUS POINTS";
	}
	
	
	@Override
	public void executeCommand(String inputStreamInstructionsToProcess) 
	{
		Customer customerCurrentlyInControl = UsersDatabase.getInstance().getCustomer(
				UserAndProtocolManager.getInstance().getCurrentUserInControl().getUserID());
		CustomerAndItsBonusPoints customerAndItsBonusPoints = 
				CustomerBonusPointsManager.getInstance().getCustomerAndItsBonusPoints(customerCurrentlyInControl);
		int customerBonusPoints = customerAndItsBonusPoints.getBonusPoints();
		
		System.out.println("You have " + customerBonusPoints + " bonus points!");
	}
}
